import turtle as tl

screen = tl.Screen()
screen.title("绘制正方形")
pen = tl.Turtle()
pen.speed(2)
pen.pensize(3)
pen.color("yellow")

n1 = (-50, -50)
n2 = (50, -50)
n3 = (50, 50)
n4 = (-50, 50)

pen.penup()
pen.goto(n1)
pen.pendown()
pen.goto(n2)
pen.goto(n3)
pen.goto(n4)
pen.goto(n1)

tl.done()